/**
 * Generate time : 2011-07-26 9:27:35
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZM04 table comment : 用户信息维护
 */
public class ZM04 extends DaoEPBase {

	private String userId = " "; /* 用户标识 */
	private String userCname = " "; /* 用户中文名称 */
	private String orgCode = " "; /* 组织机构代码 */
	private String orgName = " "; /* 组织机构名称 */
	private String userClass = " "; /* 用户分类 */
	private String idcardNo = " "; /* 证件号码 */
	private String recCreator = " "; /* 记录创建责任者 */
	private String recCreateTime = " "; /* 记录创建时刻 */
	private String recRevisor = " "; /* 记录修改责任者 */
	private String recReviseTime = " "; /* 记录修改时刻 */
	private String archiveFlag = " "; /* 归档标记 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("userId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(256);
		eiColumn.setDescName("用户标识");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("userCname");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("用户中文名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("orgCode");
		eiColumn.setFieldLength(16);
		eiColumn.setDescName("组织机构代码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("orgName");
		eiColumn.setFieldLength(100);
		eiColumn.setDescName("组织机构名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("userClass");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("用户分类");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("idcardNo");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("证件号码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("recCreator");
		eiColumn.setFieldLength(256);
		eiColumn.setDescName("记录创建责任者");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("recCreateTime");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("记录创建时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("recRevisor");
		eiColumn.setFieldLength(256);
		eiColumn.setDescName("记录修改责任者");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("recReviseTime");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("记录修改时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("archiveFlag");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("归档标记");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZM04() {
		initMetaData();
	}

	/**
	 * get the userId - 用户标识
	 * 
	 * @return the userId
	 */
	public String getUserId() {
		return this.userId;
	}

	/**
	 * set the userId - 用户标识
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 * get the userCname - 用户中文名称
	 * 
	 * @return the userCname
	 */
	public String getUserCname() {
		return this.userCname;
	}

	/**
	 * set the userCname - 用户中文名称
	 */
	public void setUserCname(String userCname) {
		this.userCname = userCname;
	}

	/**
	 * get the orgCode - 组织机构代码
	 * 
	 * @return the orgCode
	 */
	public String getOrgCode() {
		return this.orgCode;
	}

	/**
	 * set the orgCode - 组织机构代码
	 */
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	/**
	 * get the orgName - 组织机构名称
	 * 
	 * @return the orgName
	 */
	public String getOrgName() {
		return this.orgName;
	}

	/**
	 * set the orgName - 组织机构名称
	 */
	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	/**
	 * get the userClass - 用户分类
	 * 
	 * @return the userClass
	 */
	public String getUserClass() {
		return this.userClass;
	}

	/**
	 * set the userClass - 用户分类
	 */
	public void setUserClass(String userClass) {
		this.userClass = userClass;
	}

	/**
	 * get the idcardNo - 证件号码
	 * 
	 * @return the idcardNo
	 */
	public String getIdcardNo() {
		return this.idcardNo;
	}

	/**
	 * set the idcardNo - 证件号码
	 */
	public void setIdcardNo(String idcardNo) {
		this.idcardNo = idcardNo;
	}

	/**
	 * get the recCreator - 记录创建责任者
	 * 
	 * @return the recCreator
	 */
	public String getRecCreator() {
		return this.recCreator;
	}

	/**
	 * set the recCreator - 记录创建责任者
	 */
	public void setRecCreator(String recCreator) {
		this.recCreator = recCreator;
	}

	/**
	 * get the recCreateTime - 记录创建时刻
	 * 
	 * @return the recCreateTime
	 */
	public String getRecCreateTime() {
		return this.recCreateTime;
	}

	/**
	 * set the recCreateTime - 记录创建时刻
	 */
	public void setRecCreateTime(String recCreateTime) {
		this.recCreateTime = recCreateTime;
	}

	/**
	 * get the recRevisor - 记录修改责任者
	 * 
	 * @return the recRevisor
	 */
	public String getRecRevisor() {
		return this.recRevisor;
	}

	/**
	 * set the recRevisor - 记录修改责任者
	 */
	public void setRecRevisor(String recRevisor) {
		this.recRevisor = recRevisor;
	}

	/**
	 * get the recReviseTime - 记录修改时刻
	 * 
	 * @return the recReviseTime
	 */
	public String getRecReviseTime() {
		return this.recReviseTime;
	}

	/**
	 * set the recReviseTime - 记录修改时刻
	 */
	public void setRecReviseTime(String recReviseTime) {
		this.recReviseTime = recReviseTime;
	}

	/**
	 * get the archiveFlag - 归档标记
	 * 
	 * @return the archiveFlag
	 */
	public String getArchiveFlag() {
		return this.archiveFlag;
	}

	/**
	 * set the archiveFlag - 归档标记
	 */
	public void setArchiveFlag(String archiveFlag) {
		this.archiveFlag = archiveFlag;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("userId")), userId));
		setUserCname(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("userCname")), userCname));
		setOrgCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("orgCode")), orgCode));
		setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("orgName")), orgName));
		setUserClass(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("userClass")), userClass));
		setIdcardNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("idcardNo")), idcardNo));
		setRecCreator(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("recCreator")), recCreator));
		setRecCreateTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("recCreateTime")), recCreateTime));
		setRecRevisor(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("recRevisor")), recRevisor));
		setRecReviseTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("recReviseTime")), recReviseTime));
		setArchiveFlag(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("archiveFlag")), archiveFlag));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("userId", StringUtils.toString(userId, eiMetadata.getMeta("userId")));
		map.put("userCname", StringUtils.toString(userCname, eiMetadata.getMeta("userCname")));
		map.put("orgCode", StringUtils.toString(orgCode, eiMetadata.getMeta("orgCode")));
		map.put("orgName", StringUtils.toString(orgName, eiMetadata.getMeta("orgName")));
		map.put("userClass", StringUtils.toString(userClass, eiMetadata.getMeta("userClass")));
		map.put("idcardNo", StringUtils.toString(idcardNo, eiMetadata.getMeta("idcardNo")));
		map.put("recCreator", StringUtils.toString(recCreator, eiMetadata.getMeta("recCreator")));
		map.put("recCreateTime", StringUtils.toString(recCreateTime, eiMetadata.getMeta("recCreateTime")));
		map.put("recRevisor", StringUtils.toString(recRevisor, eiMetadata.getMeta("recRevisor")));
		map.put("recReviseTime", StringUtils.toString(recReviseTime, eiMetadata.getMeta("recReviseTime")));
		map.put("archiveFlag", StringUtils.toString(archiveFlag, eiMetadata.getMeta("archiveFlag")));

		return map;

	}
}